//
//  PYError.h
//  Piaoyoung
//
//  Created by LiTengFei on 15/6/2.
//  Copyright (c) 2015年 HangZhou PiaoYoung Co.Ltd. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface PYError : NSObject {
@private
    NSInteger _errorCode;
    NSString *_message;
    NSError *error;
}

@property(nonatomic, strong, readonly) NSString *message;
@property(nonatomic, assign, readonly) NSInteger errorCode;
@property(nonatomic, strong) NSError *error;

- (instancetype)initWithDictionary:(NSDictionary *)dictionary;

- (instancetype)initWithCode:(NSInteger)code message:(NSString *)message;

+ (instancetype)errorWithDictionary:(NSDictionary *)dictionary;

+ (instancetype)errorWithCode:(NSInteger)code message:(NSString *)message;

/*网络请求错误*/
+ (instancetype)networkError;
+ (instancetype)tokenUnVaildError;

@end
